load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

local_repository(
    name = "rules_xcodeproj",
    path = "../..",
)

http_archive(
    name = "build_bazel_rules_swift",
    sha256 = "32eeb4ef33c708d9c9a4ee0fa8475322ef149dabc81884ddc3b50eb2efff7843",
    url = "https://github.com/bazelbuild/rules_swift/releases/download/2.0.0/rules_swift.2.0.0.tar.gz",
)

load(
    "@rules_xcodeproj//xcodeproj:repositories.bzl",
    "xcodeproj_rules_dependencies",
)

xcodeproj_rules_dependencies()

load("@bazel_features//:deps.bzl", "bazel_features_deps")

bazel_features_deps()

load(
    "@build_bazel_rules_apple//apple:repositories.bzl",
    "apple_rules_dependencies",
)

apple_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:repositories.bzl",
    "swift_rules_dependencies",
)

swift_rules_dependencies()

load(
    "@build_bazel_rules_swift//swift:extras.bzl",
    "swift_rules_extra_dependencies",
)

swift_rules_extra_dependencies()

load(
    "@build_bazel_apple_support//lib:repositories.bzl",
    "apple_support_dependencies",
)

apple_support_dependencies()

# Used for testing shared cache between Intel and Apple silicon

register_execution_platforms("@build_bazel_apple_support//platforms:macos_x86_64")

# External repos for examples

local_repository(
    name = "examples_cc_external",
    path = "cc/external",
)

local_repository(
    name = "examples_ios_app_external",
    path = "iOSApp/external",
)

new_local_repository(
    name = "examples_command_line_external",
    build_file = "//CommandLine/external:BUILD.tpl",
    path = "CommandLine/external",
)

load(
    "@build_bazel_rules_apple//apple:apple.bzl",
    "provisioning_profile_repository",
)

provisioning_profile_repository(
    name = "local_provisioning_profiles",
)

load(":repositories.bzl", "non_bzlmod_dependencies")

non_bzlmod_dependencies()
